using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Framework.Library.Utilities;
using Framework.Module.CMS.Library.Definitions;
using Framework.Library;
using Framework.Module.CMS.Library.Distributions;
using Framework.Module.CMS.Library;
using Framework.Library.Components;
using Framework.Module.CMS.Library.Zones;

namespace Framework.Module.CMS.Web.HomePage
{
    public partial class gioithieu_homepage : CMSWebControl
    {
        int zoneid;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                zoneid = ConvertUtility.ToInt32(Portal[Constants.CMS_News + AppEnv.GetLanguage()]);
                ZoneInfo info = ZoneController.GetZone(zoneid);
                DataTable focus = DistributionController.GetDistributedContents(zoneid, 1, (int)CMSDistributionRank.Focus);
                if (focus.Rows.Count > 0)
                {
                    Label lb = (Label)this.FindControl("lb");
                    lb.Text = ConvertUtility.ToString(focus.Rows[0]["Content_Headline"]);

                    litSpecialContentBody.Text = ConvertUtility.ToStringWithoutFontBold(focus.Rows[0]["Content_Body"], 750);

                    HyperLink hpDetail = (HyperLink)this.FindControl("hpLink");
                    hpDetail.NavigateUrl = BuildUrlByContentTab(zoneid);                   
                }
            }
        }
    }
}







        